package com.smart.model.convert;

import com.smart.model.dtomapper.ProjectStatusAxisDtoMapper;
import com.smart.model.domain.ProjectStatusAxisDO;
import com.smart.model.vo.ProjectStatusAxisVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class ProjectStatusAxisConvert {

    public static List<ProjectStatusAxisVO> buildProjectStatusAxisVoList(List<ProjectStatusAxisDO> projectStatusAxisDOList) {
        if (CollectionUtils.isEmpty(projectStatusAxisDOList)) {
            return Lists.newArrayList();
        }
        List<ProjectStatusAxisVO> projectStatusAxisVOList = new ArrayList<>();
        for (ProjectStatusAxisDO projectStatusAxisDO : projectStatusAxisDOList) {
            projectStatusAxisVOList.add(ProjectStatusAxisDtoMapper.INSTANCE.do2VO(projectStatusAxisDO));
        }

        return projectStatusAxisVOList;
    }
}
